﻿using Domain;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.EIAppService
{
	public class EIAppService : IEIAppService
	{
		private readonly IEIRepository eIRepository;

		public EIAppService(IEIRepository eIRepository)
		{
			this.eIRepository = eIRepository;
		}
		public Task<bool> AddEIAsync(EI ei)
		{
			return eIRepository.AddEIAsync(ei);
		}

		public EIFenYe DateEIAsync(int page, int pageSize, int zt)
		{
			return eIRepository.DateEIAsync(page, pageSize, zt);
		}

		public Task<bool> DeleteEIAsync(int id)
		{
			return eIRepository.DeleteEIAsync(id);
		}

		public Task<EI> GetEIByNameAsync(int id)
		{
			return eIRepository.GetEIByNameAsync(id);
		}

		public Task<bool> UpdateEIAsync(EI ei)
		{
			return eIRepository.UpdateEIAsync(ei);
		}

		public Task<bool> UpdateEISAsync(EI ei)
		{
			return eIRepository.UpdateEISAsync(ei);
		}
	}
}
